package com.wcarmon.life.command{

    import com.adobe.cairngorm.commands.ICommand
    import com.adobe.cairngorm.control.CairngormEvent;
	import mx.controls.Alert;
	import com.wcarmon.life.model.LifeModelLocator;
	import com.wcarmon.life.event.*;
	import com.wcarmon.life.business.*;
	import mx.utils.ObjectUtil;
	
	public class ShowProcessCommand implements ICommand {
		include "../../includes/loggerSnippet.as";
		
		public function execute( event : CairngormEvent ) : void { 
			var e : ShowProcessEvent = ShowProcessEvent( event );			
			var model : LifeModelLocator = LifeModelLocator.getInstance();
			
			log.debug('Starting process, passed id #' + e.block_id);
			model.specificBlockIdToProcess = e.block_id;	//value or -1
			(new UpdateItemsToProcessEvent() ).dispatch();
			model.gotoScreen( LifeModelLocator.SCREEN_PROCESS );
		}
	}
}